#ifndef DV_DESTINATION_H
#define DV_DESTINATION_H
#include <ThreadUtil.h>
#include <Socket.h>
using namespace kascale;

class IDVSource;

class IDVDestination
{
public:
	IDVDestination();
	virtual ~IDVDestination();
	void SetDVSource(IDVSource* pSource);
	virtual bool Start();
	virtual bool Stop();
protected:
	virtual void* DestProc(void*);
	virtual bool Init();
	virtual bool DealPacket(char* packet, int length, const IPEndPoint& ep) = 0;
	virtual bool Cleanup();
protected:
	IDVSource*	pSource;
	thread_t	thread;
	bool		quitThread;
	SimpleEvent	evtThreadQuit;
};

#endif // !defined (DV_DESTINATION_H)

